package com.sky.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 新增员工接收数据 dto
 */
@Data
@ApiModel(value = "EmployeeDTO", description = "新增员工传递数据的模型")
public class EmployeeDTO implements Serializable {

    @ApiModelProperty("主键值")
    private Long id;

    @ApiModelProperty(value = "用户名", required = true)
    @NotBlank(message = "用户名为空")
    private String username;

    @ApiModelProperty(value = "姓名", required = true)
    @NotBlank(message = "姓名为空")
    private String name;

    @ApiModelProperty(value = "手机号码", required = true)
    @NotBlank(message = "手机号码为空")
    @Length(max = 11, min = 11, message = "手机号码请输入11位数")
    private String phone;

    @ApiModelProperty(value = "性别", required = true)
    @NotBlank(message = "性别为空")
    private String sex;

    @ApiModelProperty(value = "身份证", required = true)
    @NotBlank(message = "身份证为空")
    @Length(max = 18, min = 18, message = "身份证请输入18位数")
    private String idNumber;

}
